Object oriented programming has long been advanced as a solution for liberating programmers from the shackles of particular languages, tools, operating systems, address spaces, networks compilers or applications. Component standards are evolving for creating component infrastructures in object-oriented programming languages which will allow a component, consisting of selected distributed objects, to exist on any network and communicate with other components, whether it be across desk tops or whole enterprises. One of the leading standards is the Common Object Request Broker Architecture (CORBA). In the CORBA specification of the Object Management Group (OMG), a client is given the ability to access an object through an object reference to that object. The object reference is the information needed to specify an object to an Object Request Broker (ORB). Object references not only allow objects to be identified in a request from a client to an ORB, but also can be used to carry metastate for persistent objects. The metastate for a persistent object is the critical data needed to restore the persistent object when it does not exist in the memory of the ORB's process.
Objects may be composed by multiply inheriting the implementations of several different interfaces (an implementation of an interface is commonly called a class). Each of these classes may be implemented using different forms of persistence. Some may use the CORBAservices Persistent Object Service interfaces in their implementation. Others may use their own unique form of persistence and still others may actually be implemented as wrappers of non-object oriented legacy data (such as data previously stored in relational databases). Each of these approaches to persistence require implementations to maintain different types of metastate in order to restore a persistent object. When a single object inherits from several of theses classes, a single object reference is required to carry these various forms of metastate in order to support each of the inherited classes.
When an object inherits from multiple classes (whether they be implementations of CORBAservices such as Naming, Events, Security, Persistence, Externalization, Transactions, and Concurrency, or be they application interface implementations), maintaining the multiple metastates can be problematic. The CORBA specification requires that the reference data carried in an object reference cannot exceed an octet sequence of 1024 (this is where the metastate must be stored). When multiple different metastates are carried, this can easily be exceeded.
Besides the problem of storing multiple metastates in the object reference, another problem is how to restore the metastate of each of the object's inherited classes when the object is restored, thus allowing each of the inherited classes to restore its portion of the persistent object.
It is therefore desirable to have a method and apparatus for enabling an object reference to maintain metastate data persistently, without increasing the size of the object's reference, and for retrieving and restoring the metastate for each inherited class of a persistent object when the persistent object is being removed and restored in memory.